<%@ page language="Java" import= "java.sql.*" %>
<html>
<head>
<title>Database Search</title>
</head>
<body>
<jsp:useBean id="formHandler" scope="request" class="com.burger.counter.jspValidation.RegistrationValidation">
	<jsp:setProperty name ="formHandler" property ="*"/>
	<%
	session.setAttribute("RegionID",formHandler.getRegionData());
	%>
		
</jsp:useBean>
<%
if(formHandler.validateForm()){
%>
<jsp:forward page="/UserDataInsert">
<jsp:param name="firstName" value="<%=formHandler.getFirstName()%>" />  
<jsp:param name="lastName" value="<%=formHandler.getLastName()%>" />
<jsp:param name="email" value="<%=formHandler.getEmail()%>" />
<jsp:param name="zip" value="<%=formHandler.getZip()%>" />
<jsp:param name="dateOfBirth" value="<%=formHandler.getDateOfBirth()%>" />
<jsp:param name="regionData" value="<%=formHandler.getRegionData()%>" />
<jsp:param name="password1" value="<%=formHandler.getPassword1()%>" />
</jsp:forward>
<%
	session.setAttribute("RegionID",formHandler.getRegionData());
%>
<%	
}
else{
%>
<jsp:forward page="Registration.jsp"/>
<%
}
%>
</body>
</html>